import {get,post} from './http.js'


// 判断管理员是否登录成功
export const getLoginStatus = (params) => post("admin/login/status",params);

// 添加歌手
export const addSinger = (params) => post("singer/add",params)

// 删除歌手
export const deleteSinger = (id) => get(`singer/delete?id=${id}`)

// 删除歌手们
export const deleteSingers = (params) => get(`singer/deleteSingers?ids=${params}`)

// 修改歌手
export const updateSinger = (params) => post("singer/update",params)

// 查询所有歌手
export const getAllSinger = () => get("singer/allSinger")








// 添加歌曲
export const addSong = (params) => post('song/add',params,{headers: { "Content-Type": "multipart/form-data" }})

// 查询歌手所有歌曲
export const getAllSongsOfSinger = (params) => get(`song/allSongs?singerId=${params}`)

// 修改歌曲
export const updateSong = (params) => post('/song/update',params)

//删除歌曲
export const deleteSong = (params) => post('/song/delete',params)

// 删除多首歌曲
export const deleteSongs = (params) => get(`/song/deleteSongs?ids=${params}`)

// 查询数据库中所有歌曲
export const getAllSongs = () => get('song/all')







//  查询所有歌单
export const getAllSongList = () => get('/songList/allSongList')

// 添加歌单
export const postAddSongList = (params) =>post('/songList/add',params)

// 修改歌单
export const updateSongList = (params) => post('/songList/update',params)

// 删除歌单
export const deleteSongList = (params) => get(`/songList/delete?id=${params}`)


// 根据歌单id查询所有歌曲
export const getAllSongsByListSongId = (id) => get(`/listSong/allSong?songListId=${id}`)

// 给歌单添加歌曲
export const toListSongAddSong = (params) => post('/listSong/addSong',params)





// 添加用户
export const addConsumer = (params) => post('/consumer/add',params)

// 查询所有用户
export const getAllConsumer = () => get('/consumer/allConsumer')

// 修改用户信息
export const updateConsumer = (params) => post('consumer/update',params)

// 删除用户
export const deleteConsumer = (params) => get(`consumer/delete?id=${params}`)





